<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='bootstrap/css/bootstrap.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='easyui/themes/icon.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='easyui/themes/bootstrap/easyui.css') }}">
    <!--  引入外部的js库-->
    <script src="{{ url_for('static',filename='easyui/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='easyui/jquery.easyui.min.js') }}"></script>
    <script src="{{ url_for('static',filename='easyui/locale/easyui-lang-zh_CN.js') }}"></script>
</head>
<body>
首页
<button id="btn1" class="btn btn-primary">登录</button>
<button id="btnajaxget" class="btn btn-primary">ajax get方式提交数据</button>
<button id="index_btn_reg" class="btn btn-primary">注册</button>
<div id="index_dlg"></div>
<script>

    $(function(){
        //$.messager.alert('系统提示','这是前台首页,正在开发中...','warning')

        // 请求服务器
        $('#btnajaxget').on('click',function(e){
            // get请求
            $.messager.progress();
            $.get("/do_ajax_get?comp=博智科技",function(data){
                console.log(data)
                $.messager.progress('close');
                $.messager.alert('系统提示','ajax获取的数据是'
                + data.schoolname + ' '
                + data.address,'warning')
            })

        })

        $('#index_btn_reg').on('click',function(e){
            $('#index_dlg').dialog({
                title: '用户注册',
                width: 400,
                height: 240,
                closed: false,
                cache: false,
                href: "/reg",
                modal: true
            })

        })
    })
</script>
</body>
</html>